$(document).ready(function(){
    var commentForm = $('#comment-action');
    var parentComment = commentForm.find('#to-comment');
    var commentId   = 0;
    var replyArea = '';
    
    $('a.reply').click(function(){
        replyArea = $(this).closest('div.reply-area');
        commentId = replyArea.attr('id');
        commentId = commentId.replace('reply-area-','');
        if(commentId != parentComment.val()){
            // Description area moved
            $('#comment-descripiton').val('');
        }
        parentComment.val(commentId);
        commentForm.appendTo(replyArea);
        return false;
    });

//    $('#save-comment').click(function(){
//
//    });
});
